<%--
 * list.jsp
 *
 * Copyright (C) 2013 Universidad de Sevilla
 * 
 * The use of this project is hereby constrained to the conditions of the 
 * TDG Licence, a copy of which you may download from 
 * http://www.tdg-seville.info/License.html
 --%>

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@taglib prefix="acme" tagdir="/WEB-INF/tags"%>

<display:table pagesize="5" class="displaytag" keepStatus="true"
	name="vecinos" requestURI="${requestURI}" id="row">

	<spring:message code="vecino.dni" var="dniHeader" />
	<display:column property="dni" title="${dniHeader}" sortable="false" />

	<spring:message code="vecino.nombre" var="nomHeader" />
	<display:column property="nombre" title="${nomHeader}" sortable="false" />

	<spring:message code="vecino.apellidos" var="apeHeader" />
	<display:column property="apellidos" title="${apeHeader}"
		sortable="false" />

	<spring:message code="vecino.email" var="mailHeader" />
	<display:column property="email" title="${mailHeader}" sortable="false" />

	<spring:message code="vecino.vivienda" var="vivHeader" />
	<display:column property="vivienda" title="${vivHeader}"
		sortable="false" />

	<security:authorize access="hasRole('ADMINISTRADOR')">

		<spring:message code="vecino.moroso" var="morosoHeader" />


		<display:column title="${morosoHeader}">
			<jstl:if test="${row.moroso==true}">
				<spring:message code="vecino.esMoroso" />
			</jstl:if>
		</display:column>


		<display:column>
			<a href="vecino/administrator/edit.do?vecinoId=${row.id}"><spring:message
					code="vecino.view" /></a>
		</display:column>
	</security:authorize>
</display:table>
<jstl:if test="${asistentesView==null}">
	<acme:cancel code="vecino.goBack" url="${backURI}" />

</jstl:if>
<jstl:if test="${asistentesView}">
	<security:authorize access="hasRole('VECINO')">
		<acme:cancel code="vecino.goBack"
			url="/reunion/vecino/edit.do?reunionId=${reunionId}" />

	</security:authorize>
	<security:authorize access="hasRole('ADMINISTRADOR')">
		<acme:cancel code="vecino.goBack"
			url="/reunion/administrator/edit.do?reunionId=${reunionId}" />

	</security:authorize>
</jstl:if>



